[BugFix] support push down text field correctly.#3376
Merged
LantaoJin merged 5 commits intoopensearch-project:feature/calcite-enginefrom Mar 4, 2025
Merged
Conversation
Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
LantaoJin
reviewed
Mar 4, 2025
| RexInputRef ref, List<String> schema, Map<String, OpenSearchDataType> typeMapping) { | ||
| this.name = | ||
| (ref == null || ref.getIndex() >= schema.size()) ? null : schema.get(ref.getIndex()); | ||
| this.type = typeMapping.get(name); |
Collaborator
Author
There was a problem hiding this comment.
It won't return null for this map from the source, see
.| return type; | ||
| } | ||
|
|
||
| boolean isTextType() { |
Member
There was a problem hiding this comment.
how about change to notKeyword(), isTextType looks specific purpose
Collaborator
Author
There was a problem hiding this comment.
I don't know if there is other case like Text type where we need to find keyword subfield.
There is similar specific method name in flint, https://github.com/opensearch-project/opensearch-spark/blob/c0c315f010fc1ef4606964e6b34a8ba6fb79949e/flint-spark-integration/src/main/scala/org/apache/spark/sql/flint/storage/FlintQueryCompiler.scala#L208, maybe just follow it.
Signed-off-by: Heng Qian <qianheng@amazon.com>
LantaoJin
approved these changes
Mar 4, 2025
fa63b23
into
opensearch-project:feature/calcite-engine
5 of 13 checks passed
penghuo
pushed a commit
to penghuo/os-sql
that referenced
this pull request
Mar 12, 2025
…3376) * [BugFix] Fix text field push down Signed-off-by: Heng Qian <qianheng@amazon.com> * Ignore CalciteSortCommandIT.testSortWithNullValue Signed-off-by: Heng Qian <qianheng@amazon.com> * Refine code: only get keyword subfield for termQuery builder Signed-off-by: Heng Qian <qianheng@amazon.com> * Refine code Signed-off-by: Heng Qian <qianheng@amazon.com> * remove ignore tests in CalcitePPLInSubqueryIT Signed-off-by: Heng Qian <qianheng@amazon.com> --------- Signed-off-by: Heng Qian <qianheng@amazon.com>
penghuo
pushed a commit
that referenced
this pull request
Jun 16, 2025
* [BugFix] Fix text field push down Signed-off-by: Heng Qian <qianheng@amazon.com> * Ignore CalciteSortCommandIT.testSortWithNullValue Signed-off-by: Heng Qian <qianheng@amazon.com> * Refine code: only get keyword subfield for termQuery builder Signed-off-by: Heng Qian <qianheng@amazon.com> * Refine code Signed-off-by: Heng Qian <qianheng@amazon.com> * remove ignore tests in CalcitePPLInSubqueryIT Signed-off-by: Heng Qian <qianheng@amazon.com> --------- Signed-off-by: Heng Qian <qianheng@amazon.com> Signed-off-by: xinyual <xinyual@amazon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When pushing filter with text field, I should construct QueryBuilder by using its subfield of keyword type; Otherwise, we cannot push down this field.
This PR includes change:
CalciteSortCommandITsince we already addressed the issue of order perseverance for PPL in this PR: Fix execution errors caused by plan gap #3350../gradlew :integ-test:integTest --tests '*Calcite*IT'succeed locally.Related Issues
Resolves #3334, #3373
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.